﻿<Window x:Class="MvvmInteractivity.Sample.CloseFromViewModelSampleWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
		xmlns:behaviours="clr-namespace:MvvmInteractivity.Behaviours;assembly=MvvmInteractivity" xmlns:ViewModels="clr-namespace:MvvmInteractivity.Sample.ViewModels" Height="300"
        Width="300"
        Title="MVVM Behaviors sample" AllowDrop="True">
	<Window.DataContext>
		<ViewModels:ClosableViewModel />
	</Window.DataContext>
	<i:Interaction.Behaviors>
		<behaviours:CloseWindowFromViewModel />
		<behaviours:DragAndDropBehaviour />
	</i:Interaction.Behaviors>
	<Grid x:Name="LayoutRoot">

		<TextBlock Text="{Binding DropData, TargetNullValue='Drop file onto the window'}"
			VerticalAlignment="Top" Height="30"/>
		<Button Content="Close me, please..." Width="120" Height="30" VerticalAlignment="Center"
			HorizontalAlignment="Center" Command="{Binding CloseCommand}"/>

	</Grid>
</Window>
